{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-10-18T18:27:31.265170Z",
     "start_time": "2023-10-18T18:27:31.261126Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'/Users/stefankrawczyk/dagworks/hamilton/contrib/hamilton/contrib/user/zilto/text_summarization'"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "import hamilton\n",
    "\n",
    "os.getcwd()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/stefankrawczyk/.pyenv/versions/knowledge_retrieval-py39/lib/python3.9/site-packages/pyspark/pandas/__init__.py:50: UserWarning: 'PYARROW_IGNORE_TIMEZONE' environment variable was not set. It is required to set this environment variable to '1' in both driver and executor sides if you use pyarrow>=2.0.0. pandas-on-Spark will set it for you but it does not work if there is a Spark context already launched.\n",
      "  warnings.warn(\n"
     ]
    }
   ],
   "source": [
    "import __init__ as text_summarization"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-10-18T18:27:34.563147Z",
     "start_time": "2023-10-18T18:27:34.560195Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Summarize this text from foo. Extract any key points with reasoning.\\n\\nContent:'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "text_summarization.summarize_chunk_of_text_prompt(\"foo\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-10-18T18:26:07.979913Z",
     "start_time": "2023-10-18T18:26:07.965216Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Generator',\n",
       " 'PdfReader',\n",
       " 'Union',\n",
       " '__builtins__',\n",
       " '__cached__',\n",
       " '__doc__',\n",
       " '__file__',\n",
       " '__loader__',\n",
       " '__name__',\n",
       " '__package__',\n",
       " '__spec__',\n",
       " '_create_chunks',\n",
       " '_summarize_chunk',\n",
       " 'chunked_text',\n",
       " 'concurrent',\n",
       " 'config',\n",
       " 'contrib',\n",
       " 'logger',\n",
       " 'logging',\n",
       " 'openai',\n",
       " 'prompt_and_text_content',\n",
       " 'raw_text__pdf',\n",
       " 'raw_text__txt',\n",
       " 'retry',\n",
       " 'stop_after_attempt',\n",
       " 'summarize_chunk_of_text_prompt',\n",
       " 'summarize_text_from_summaries_prompt',\n",
       " 'summarized_chunks',\n",
       " 'summarized_text',\n",
       " 'tempfile',\n",
       " 'tiktoken',\n",
       " 'tqdm',\n",
       " 'wait_random_exponential']"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dir(text_summarization)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-10-18T18:26:29.863848Z",
     "start_time": "2023-10-18T18:26:29.857734Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'/Users/stefankrawczyk/dagworks/hamilton/contrib/hamilton/contrib/user/zilto/text_summarization/__init__.py'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "text_summarization.__file__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
